export const strToHtml = (str: string) => {
  var encodedStr = '';
  if (str == '') return encodedStr;
  else {
    for (var i = 0; i < str.length; i++) {
      encodedStr +=
        '&#' +
        str
          .substring(i, i + 1)
          .charCodeAt(i)
          .toString(10) +
        ';';
    }
  }
  return encodedStr;
};
